
<div class="row">
	<ol class="breadcrumb">
		<li><a href="{:U('Index/index')}"><span class="glyphicon glyphicon-home"></span></a></li>
		<li class="active">招聘信息设置</li>
	</ol>
</div><!--/.row-->

<div class="row">
	<div class="col-lg-12">
		<h1 class="page-header">招聘信息设置</h1>
	</div>
</div><!--/.row-->


<script>
$(function(){
    $("#change").val({$type});
	$("#change").on("change",function(){
		var id=$(this).val();
	 			// alert(id);
		$.ajax({
			url:"{:U('JoinUs/getContent')}",
			type:"post",
			data:{"type":id},
			success:function(data){
				var str='';
                for (var i = 0; i < data.length; i++) {
                    str+='<tr>';
                    str+='<td>'+data[i]["time"]+'</td>';
                    str+='<td>'+data[i]["content"]+'</td>';
                    str+='<td><a href="{:U('JoinUs/joinusDel')}&id='+data[i]["Id"]+'">删除</a></td>';
                    str+='</tr>';
                }
                $("#add_table tbody").html(str);
			}
		});
	})
})
</script>


<!-- 提交 -->
<form action="{:U('JoinUs/addjoinUs')}" method="post" enctype="multipart/form-data"> 
<div class="row">
    <div class="col-md-12">
        <select class="form-control" name="type" id="change">
            <option value="1">UI招聘</option>
            <option value="2">H5招聘</option>
            <option value="3">JAVA招聘</option>
            <option value="4">网络营销招聘</option>
            <option value="5">APP招聘</option>
        </select>
    </div>
</div>
<div class="form-group">
    </div>
<table data-toggle="table" data-url="tables/data2.json" class="table table-hover" name="type" id="add_table">
    <thead>
        <tr>
            <th>发布时间</th>
            <th>招聘内容</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        <?php foreach($joinuslist as $k => $v) { ?>
        <tr>
            <td><?php echo $v["time"]; ?></td>
            <td><?php echo $v["content"]; ?></td>
            <td><a href="{:U('JoinUs/joinusDel?id='.$v['Id'])}">删除</a></td>
        </tr>
        <?php } ?>
    </tbody>
</table>              
        <textarea id="editor_id" name="content" style="width:700px;height:300px;">
        </textarea>
        <div class="form-group">
        </div>    
    <button type="submit" class="btn btn-primary">提交</button>
</form>